package cn.edu.example.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.example.dao.PlaceDao; 
import cn.edu.example.po.Place;
import cn.edu.example.service.PlaceService;

@Service("placeService")
@Transactional
public class PlaceServiceImpl implements PlaceService{
	
	@Autowired
	private PlaceDao placeDao;
	
	@Override
	public List getPlaceList() {
		List list = this.placeDao.getplacelist();
		return list;
	}

	@Override
	public int delPlace(String placename) {
		return placeDao.delPlace(placename);
	}

	@Override
	public int createPlace(Place place) {
		return this.placeDao.createPlace(place);
	}

	@Override
	public Place getPlaceById(Integer place_id) {
		Place place = this.placeDao.getPlaceById(place_id);
		return place;
	}

	@Override
	public int updatePlace(Place place) {
		return this.placeDao.updatePlace(place);
	}

	@Override
	public List getfindPlaceList(String place_name) {
		List list = placeDao.getfindPlaceList(place_name);
		return list;
	}

}
